﻿package dt 
{
	import flash.display.DisplayObject;
	import flash.display.MovieClip;
	import flash.display.SimpleButton;
	import game.events.EventData;

	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.text.TextField;
	import flash.text.TextFormat;
	import game.exchangeddata.HashTable;
	import game.ChannelPanel;
	/**
	 * ...
	 * @author Doan Nguyen Thuy Nha Truc (Bamboo)	
	 */
	public class ChannelPanel extends MovieClip
	{
		
		public var channel:game.ChannelPanel;
		public var icon:MovieClip;
		public function ChannelPanel() 
		{
			this.addEventListener(MouseEvent.ROLL_OUT, rollOutHdl);
			this.icon.addEventListener(MouseEvent.ROLL_OVER, rollOverHdl);
			this.hide();
		}
		
		private function rollOutHdl(e:MouseEvent):void 
		{
			this.hide();
		}
		
		private function rollOverHdl(e:MouseEvent):void 
		{
			this.show();
		}
		
		
		
		public function hide():void {
			if(this.channel.visible)
			{	
				this.channel.visible = false;
				trace("hide channel");
			}
			
			
		}
		public function show():void {
			if(!this.channel.visible)
			{	
				this.channel.visible =  true;
				trace("show channel");
			}
		}
		
		public function initChannel(i:int):void {
			this.channel.gotoAndStop(i);
		}
		
		public function initListChannel(data:Array) {
			this.channel.addListChannel(data);
		}
		
		public function setChannelActiving(str:String, color:uint):void {
			this.channel.setChannelActiving(str, color);
		}
		
		public function get getYellowColor():uint {
			return this.channel.yellowColor;
		}
		public function get getWhiteColor():uint {
			return this.channel.whiteColor;
		}
		
		public function get channelActived():String {
			return channel.channelActived;
		}
		
		public function set channelActived(value:String):void {
			this.channel.channelActived = value;
		}
		
		public function get channelActiving():String {
			return channel.channelActiving;
		}
		
		public function set channelActiving(value:String):void {
			this.channel.channelActiving = value;
		}
	}

}